<style>
#komercijalaForm{
	width:350px;
}
#komercijalaForm textarea{
	width:250px;
	height:70px;
}
#komercijalaForm label{
	width:80px;
	display:block;
	float:left;
	padding-top:8px;
	text-align:right;
}
#komercijalaForm input[type=submit]{
	float:right;
	padding-left:16px;
	background-image:url(gui/icons/save.gif);
	background-repeat:no-repeat;
	background-position:3px center;
}
#komercijalaForm input[type=text]:disabled{
	background:#fff;
	color:#000;
	border:1px solid #7F9DB9;
	cursor:default;
}
#komercijalaForm input[type=button].searchBtn{
	width:16px;
	height:16px;
	background:url(gui/icons/search.gif) no-repeat center center;
	border:none;
	cursor:pointer;
}

#komercijalaForm select optgroup{
	background:Highlight;
	color:HighlightText;
	font-size:14px;
	font-style:normal;
}
#komercijalaForm select optgroup option{
	background:#fff;
	color:#000;
	font-size:11px;
}
</style>
<form id="komercijalaForm" method="post" action="javascript:void(0)" onsubmit="addRokovnikKomerc(this)" class="area">
	<h1>Teren - komercijala</h1>
	
	<input type="hidden" name="a" value="komSave" />
	
	<!-- KOMITENT -->
  	<label for="komitent">Komitent:</label>
	<input type="text" disabled="disabled" name="komitent" id="komitent" />
	<input type="hidden" name="komitent_id" id="komitent_id" />
	<input type="button" onclick="searchKomitentRokovnik(this,1)" title="Nađi komitenta..." value="" class="searchBtn" /><br clear="all" />
	
	<!-- RADNIK -->
	<label for="radnik">Komercijalista:</label>
	<select name="radnik" id="radnik">
		<option value="0">---</option>
		{{%loop start radnik_id}}
		<option value="{{$radnik_id}}">{{$radnik_ime}}&nbsp;{{$radnik_prezime}}</option>
		{{%loop end}}
	</select><br clear="all" />
	
	<!-- DATUM I VREME POSETE -->
	<label for="visit_date">Vreme posete:</label>
		<input type="text" name="visit_date" id="visit_date" maxlength="10" style="width:60px;" onchange="setTeritorySelect(this)" onfocus="setTeritorySelect(this)" />
		<input type="button" class="datePicker" onclick="displayDatePicker('visit_date',this)" title="Odaberi datum" />
	<label for="result_hour" style="width:25px;">Sat:</label>
	<input type="text" maxlength="2" name="visit_hour" id="visit_hour" style="width:16px;" maxval="23" minval="0" value="0" onchange="fixNumStepVal(this)" />
	<img src="gui/numstep.gif" border="0" usemap="#Map1" class="numstep" />
	<label for="result_minute" style="width:auto;">Min:</label>
	<input type="text" maxlength="2" name="visit_minute" id="visit_minute" style="width:16px;" maxval="59" minval="0" value="0" onchange="fixNumStepVal(this)" />
	<img src="gui/numstep.gif" border="0" usemap="#Map2" class="numstep" />
	<map name="Map1" id="Map1">
		<area shape="rect" coords="0,0,7,5" href="javascript:void(0)" onclick="incrementNumStep('visit_hour');" />
		<area shape="rect" coords="0,5,7,10" href="javascript:void(0)" onclick="decrementNumStep('visit_hour');" />
	</map>
	<map name="Map2" id="Map2">
		<area shape="rect" coords="0,0,7,5" href="javascript:void(0)" onclick="incrementNumStep('visit_minute');" />
		<area shape="rect" coords="0,5,7,10" href="javascript:void(0)" onclick="decrementNumStep('visit_minute');" />
	</map><br clear="all" />
	
	<!-- TERITORIJA -->
	<label for="teritorija">Teritorija:</label>
	<select name="teritorija" id="teritorija" onchange="var d=this.options[this.selectedIndex].getAttribute('date'); document.getElementById('visit_date').value=d">
		<option value="0">---</option>
		{{$teritorije_select}}
		<!--
		<option value="{{$teritorija_id}}" title="{{$teritorija_desc}}" date="{{$teritorija_datum}}">{{$teritorija_name}}</option>
		-->
	</select><br clear="all" />
	
	<!-- DATUM I VREME ZAKAZANOG POZIVA -->
	<label for="zak_call_date">Vreme poziva:</label>
		<input type="text" name="zak_call_date" id="zak_call_date" maxlength="10" style="width:60px;" />
		<input type="button" class="datePicker" onclick="displayDatePicker('zak_call_date',this)" title="Odaberi datum" />
	<label for="result_hour" style="width:25px;">Sat:</label>
	<input type="text" maxlength="2" name="zak_call_hour" id="zak_call_hour" style="width:16px;" maxval="23" minval="0" value="0" onchange="fixNumStepVal(this);" />
	<img src="gui/numstep.gif" border="0" usemap="#Map3" class="numstep" />
	<label for="result_minute" style="width:auto;">Min:</label>
	<input type="text" maxlength="2" name="zak_call_minute" id="zak_call_minute" style="width:16px;" maxval="59" minval="0" value="0" onchange="fixNumStepVal(this)" />
	<img src="gui/numstep.gif" border="0" usemap="#Map4" class="numstep" />
	<map name="Map3" id="Map3">
		<area shape="rect" coords="0,0,7,5" href="javascript:void(0)" onclick="incrementNumStep('zak_call_hour');" />
		<area shape="rect" coords="0,5,7,10" href="javascript:void(0)" onclick="decrementNumStep('zak_call_hour');" />
	</map>
	<map name="Map4" id="Map4">
		<area shape="rect" coords="0,0,7,5" href="javascript:void(0)" onclick="incrementNumStep('zak_call_minute');" />
		<area shape="rect" coords="0,5,7,10" href="javascript:void(0)" onclick="decrementNumStep('zak_call_minute');" />
	</map><br clear="all" />
	
	<!-- POREKLO -->
	<label for="poreklo">Poreklo:</label>
	<select name="poreklo" id="poreklo">
		<option value="0">---</option>
		{{%loop start poreklo_id}}
		<option value="{{$poreklo_id}}">{{$poreklo_name}}</option>
		{{%loop end}}
	</select><br clear="all" />
	
	<!-- ODGOVOR -->
	<label for="odgovor">Odgovor:</label>
	<select name="odgovor" id="odgovor">
		<option value="0">---</option>
		{{%loop start odgovor_id}}
		<option value="{{$odgovor_id}}">{{$odgovor_name}}</option>
		{{%loop end}}
	</select><br clear="all" />
	
	<!-- NAPOMENA -->
	<label for="napomena">Napomena:</label>
	<textarea name="napomena" id="napomena"></textarea><br clear="all" />
	
	<input type="submit" value="Sačuvaj" />
</form>